package com.city.domain.economic;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 安全管理机构
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "enterprise_management_agency", schema = "city", catalog = "")
public class EnterpriseManagementAgency {
    private int id;//主键
    private int enterpriseId;//企业编号索引
    private int userId;//用户id
    private String name;//姓名
    private String tellPhone;//手机号
    private String officeTell;//办公电话
    private String louspcId;//单位安全生产委员会成员名单编号,与基本人员信息表中对应
    private String louspc;//单位安全生产委员会成员名单姓名

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "enterprise_id")
    public int getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(int enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    @Basic
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "tell_phone")
    public String getTellPhone() {
        return tellPhone;
    }

    public void setTellPhone(String tellPhone) {
        this.tellPhone = tellPhone;
    }

    @Basic
    @Column(name = "office_tell")
    public String getOfficeTell() {
        return officeTell;
    }

    public void setOfficeTell(String officeTell) {
        this.officeTell = officeTell;
    }

    @Basic
    @Column(name = "louspc_id")
    public String getLouspcId() {
        return louspcId;
    }

    public void setLouspcId(String louspcId) {
        this.louspcId = louspcId;
    }

    @Basic
    @Column(name = "louspc")
    public String getLouspc() {
        return louspc;
    }

    public void setLouspc(String louspc) {
        this.louspc = louspc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EnterpriseManagementAgency that = (EnterpriseManagementAgency) o;
        return id == that.id &&
                enterpriseId == that.enterpriseId &&
                userId == that.userId &&
                Objects.equals(name, that.name) &&
                Objects.equals(tellPhone, that.tellPhone) &&
                Objects.equals(officeTell, that.officeTell) &&
                Objects.equals(louspcId, that.louspcId) &&
                Objects.equals(louspc, that.louspc);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, enterpriseId, userId, name, tellPhone, officeTell, louspcId, louspc);
    }
}
